<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<?php 

$rProducts = new Model_DbTable_Pr_Prproducts();
$dateToday = Model_DatetimeHelper::dateToday();
$date7days = Model_DatetimeHelper::adjustDays("sub", $dateToday,7);
$actCate = new Model_DbTable_Pr_Pricecategory();
$acList = $actCate->listAllActive();
?>
<body style="font-family:Arial, Helvetica, sans-serif;">
<?php

//setcookie("UserCookie","Q6bWLaFMNKp9B27",time() + 604800);

if($this->error){
	
	echo "<h1>YOU MAY ONLY CHECK THIS PAGE BY CLICK THE LINK ON THE COMPANY INFO PAGE, DO NOT SAVE THE LINK</h1>";
	}
else{	
?>

<h1>Phone Repair Parts Price</h1>
<h1 style="color:#F30;">Important Information</h1>
<div><strong>Additional extended warranty price (30days)<br />
Include ( LCD screen,all the parts repair, except magic back cover)<br />
</strong><br />

</div>
<div><strong>- iPhone 4 / 4s / 5 / 5s / 5c : $10 <br />
  <br />
</strong></div>
<div><strong>- iPad Series: $15<br />
  <br />
</strong></div>
<strong>- Samsung &amp; Others : $20</strong><strong ><br />
<br />
  The <img src="/im/sync.png" /> icon means the price is updated within 7 days,please put mouse cursor on the icon to check the date of update<br/>
</strong>
<table  border="1" cellspacing="0" cellpadding="0">
  <tr>
    <th colspan="3" bgcolor="#333333" scope="col" style="color:#fff; font-size:18px; padding:10px;">APPLE</th>
  </tr>
  <tr>
    <td align="center" valign="middle" style="width:100px;"><strong>Apple</strong></td>
    <td align="center" valign="middle" style="width:100px;"><strong>iPad</strong></td>
    <td><table width="100%" border="1" cellspacing="0" cellpadding="5">
        <tr>
          <td style="width:100px;" >&nbsp;</td>
          <td  style="width:420px;" >&nbsp;</td>
          <?php 
    foreach($acList as $list){
    ?>
          <td  style="width:100px; font-size:12px;"><?php echo $list['title_category']?></td>
          <?php }?>
        </tr>
        <?php 
    $rPlist80 = $rProducts->listProductsByCate(4);

    foreach($rPlist80 as $key => $v){

    if($v["price_a"]>0){	
    	?>
        <tr>
          <td style="width:100px;"><?php echo $v["code_product"]?></td>
          <td style="width:420px;"><?php echo $v["title_product"]?></td>
          <td align="center" valign="middle" width="100"
        <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?>
        ><span>
            <?php 
        
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
        	
        	echo '<a href="javascript:return false;" style="text-decoration:none" title="'.$v["date_introduce"].'"><img src="/im/sync.png" /></a>';
        }
        
        ?>
            <?php echo ($v["price_a"] == 999)?"CALL": $v["price_a"] ;?></span></td>
          <?php foreach($acList as $acKey => $acValue){
       
          if($acValue['id_price_category']!='price_a'){
          	?>
          <td align="center" valign="middle" width="100" <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?>  ><?php if($v[$acValue['id_price_category']] >=0) { ?>
            <span <?php
         			 if($acValue['id_price_category']=='price_q' || $acValue['id_price_category']=='price_r2'){
			   			if(strtotime($v["date_introduce"]) > strtotime($date7days)){
							echo 'style="color:#FC0"';
						}else{
			 				 echo 'style="color:#FFFFFF;"';
						}
			  		 }?>><?php echo (($acValue['id_price_category']=='price_r' || $acValue['id_price_category']=='price_s' || $acValue['id_price_category']=='price_t') && $v[$acValue['id_price_category']] >0 )?"+":" "  ?> <?php echo $v[$acValue['id_price_category']]?> </span>
            <?php
          			}
          	 ?></td>
          	 
          <?php }}?>
        </tr>
        <?php
    }
    } ?>
      </table></td>
  </tr>
  <tr>
    <td align="center" valign="middle" style="width:100px;"><strong>Apple</strong></td>
    <td align="center" valign="middle" style="width:100px;"><strong>iPad Mini</strong></td>
    <td><table width="100%" border="1" cellspacing="0" cellpadding="5">
        <tr>
          <td style="width:100px;" >&nbsp;</td>
          <td  style="width:420px;" >&nbsp;</td>
          <?php 
    foreach($acList as $list){
    ?>
          <td  style="width:100px; font-size:12px;"><?php echo $list['title_category']?></td>
          <?php }?>
        </tr>
        <?php 
    $rPlist80 = $rProducts->listProductsByCate(12);
    
    foreach($rPlist80 as $key => $v){

    if($v["price_a"]>0){	
    	?>
        <tr>
          <td style="width:100px;"><?php echo $v["code_product"]?></td>
          <td style="width:420px;"><?php echo $v["title_product"]?></td>
          <td align="center" valign="middle"
        <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?> width="100"
        ><span>
            <?php 
        
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
        	
        	echo '<a href="javascript:return false;" style="text-decoration:none" title="'.$v["date_introduce"].'"><img src="/im/sync.png" /></a>';
        }
        
        ?>
            <?php echo ($v["price_a"] == 999)?"CALL": $v["price_a"] ;?></span></td>
          <?php foreach($acList as $acKey => $acValue){
          if($acValue['id_price_category']!='price_a'){
          	?>
          <td align="center" valign="middle"  width="100"  <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?> ><?php if($v[$acValue['id_price_category']] >0) { ?>
            <span
          <?php
          if($acValue['id_price_category']=='price_q' || $acValue['id_price_category']=='price_r2'){
			   if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="color:#FC0"';
		}else{
			  echo 'style="color:#FFFFFF;"';
		}
			  }
		  ?>
            ><?php echo (($acValue['id_price_category']=='price_r' || $acValue['id_price_category']=='price_s' || $acValue['id_price_category']=='price_t') && $v[$acValue['id_price_category']] >0 )?"+":" "  ?> <?php echo $v[$acValue['id_price_category']]?> </span>
            <?php
          	}
          	} ?></td>
          <?php }?>
        </tr>
        <?php
    }
    } ?>
      </table></td>
  </tr>
  <tr>
    <td align="center" valign="middle" style="width:100px;"><strong>Apple</strong></td>
    <td align="center" valign="middle" style="width:100px;"><strong>iTouch 1/2/3/4/ nano</strong></td>
    <td><table width="100%" border="1" cellspacing="0" cellpadding="5">
        <tr>
          <td style="width:100px;" >&nbsp;</td>
          <td  style="width:420px;" >&nbsp;</td>
          <?php 
    foreach($acList as $list){
    ?>
          <td  style="width:100px; font-size:12px;"><?php echo $list['title_category']?></td>
          <?php }?>
        </tr>
        <?php 
    $rPlist81 = $rProducts->listProductsByCate(3);
    
    foreach($rPlist81 as $key => $v){

    if($v["price_a"]>0){	
    	?>
        <tr>
          <td style="width:100px;"><?php echo $v["code_product"]?></td>
          <td style="width:420px;"><?php echo $v["title_product"]?></td>
          <td align="center" valign="middle"
                <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?>  width="100" 
        ><span>
            <?php 
        
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
        	
        	echo '<a href="javascript:return false;" style="text-decoration:none" title="'.$v["date_introduce"].'"><img src="/im/sync.png" /></a>';
        }
        
        ?>
            <?php echo ($v["price_a"] == 999)?"CALL": $v["price_a"] ;?></span></td>
          <?php foreach($acList as $acKey => $acValue){
          if($acValue['id_price_category']!='price_a'){
          	?>
          <td align="center" valign="middle"  width="100" <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?>><?php if($v[$acValue['id_price_category']] >0) { ?>
            <span
                      <?php
          if($acValue['id_price_category']=='price_q' || $acValue['id_price_category']=='price_r2'){
			   if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="color:#FC0"';
		}else{
			  echo 'style="color:#FFFFFF;"';
		}
			  }
		  ?>
              ><?php echo (($acValue['id_price_category']=='price_r' || $acValue['id_price_category']=='price_s' || $acValue['id_price_category']=='price_t') && $v[$acValue['id_price_category']] >0 )?"+":" "  ?> <?php echo $v[$acValue['id_price_category']]?> </span>
            <?php
          	}
          	} ?></td>
          <?php }?>
        </tr>
        <?php
    }
    } ?>
      </table></td>
  </tr>
  <tr>
    <td align="center" valign="middle" style="width:100px;"><strong>Apple</strong></td>
    <td align="center" valign="middle" style="width:100px;"><strong>iPhone 3G/3S</strong></td>
    <td><table width="100%" border="1" cellspacing="0" cellpadding="5">
        <tr>
          <td style="width:100px;" >&nbsp;</td>
          <td  style="width:420px;" >&nbsp;</td>
          <?php 
    foreach($acList as $list){
    ?>
          <td  style="width:100px; font-size:12px;"><?php echo $list['title_category']?></td>
          <?php }?>
        </tr>
        <?php 
    $rPlist82 = $rProducts->listProductsByCate(0);
    
    foreach($rPlist82 as $key => $v){

    if($v["price_a"]>0){	
    	?>
        <tr>
          <td style="width:100px;"><?php echo $v["code_product"]?></td>
          <td style="width:420px;"><?php echo $v["title_product"]?></td>
          <td align="center" valign="middle"
               <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?>  width="100"
        ><span>
            <?php 
        
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
        	
        	echo '<a href="javascript:return false;" style="text-decoration:none" title="'.$v["date_introduce"].'"><img src="/im/sync.png" /></a>';
        }
        
        ?>
            <?php echo ($v["price_a"] == 999)?"CALL": $v["price_a"] ;?></span></td>
          <?php foreach($acList as $acKey => $acValue){
          if($acValue['id_price_category']!='price_a'){
          	?>
          <td align="center" valign="middle"  width="100" <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?> ><?php if($v[$acValue['id_price_category']] >0) { ?>
            <span
                     <?php
          if($acValue['id_price_category']=='price_q' || $acValue['id_price_category']=='price_r2'){
			   if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="color:#FC0"';
		}else{
			  echo 'style="color:#FFFFFF;"';
		}
			  }
		  ?> 
              ><?php echo (($acValue['id_price_category']=='price_r' || $acValue['id_price_category']=='price_s' || $acValue['id_price_category']=='price_t') && $v[$acValue['id_price_category']] >0 )?"+":" "  ?> <?php echo $v[$acValue['id_price_category']]?> </span>
            <?php
          	}
          	} ?></td>
          <?php }?>
        </tr>
        <?php
    }
    } ?>
      </table></td>
  </tr>
  <tr>
    <td align="center" valign="middle" style="width:100px;"><strong>Apple</strong></td>
    <td align="center" valign="middle" style="width:100px;"><strong>iPhone 4G/4S</strong></td>
    <td><table width="100%" border="1" cellspacing="0" cellpadding="5">
        <tr>
          <td style="width:100px;" >&nbsp;</td>
          <td  style="width:420px;" >&nbsp;</td>
          <?php 
    foreach($acList as $list){
    ?>
          <td  style="width:100px; font-size:12px;"><?php echo $list['title_category']?></td>
          <?php }?>
        </tr>
        <?php 
    $rPlist83 = $rProducts->listProductsByCate(1);
    
    foreach($rPlist83 as $key => $v){

    if($v["price_a"]>0){	
    	?>
        <tr>
          <td style="width:100px;"><?php echo $v["code_product"]?></td>
          <td style="width:420px;"><?php echo $v["title_product"]?></td>
          <td align="center" valign="middle"
                <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?>  width="100"
        ><span>
            <?php 
        
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
        	
        	echo '<a href="javascript:return false;" style="text-decoration:none" title="'.$v["date_introduce"].'"><img src="/im/sync.png" /></a>';
        }
        
        ?>
            <?php echo ($v["price_a"] == 999)?"CALL": $v["price_a"] ;?></span></td>
          <?php foreach($acList as $acKey => $acValue){
          if($acValue['id_price_category']!='price_a'){
          	?>
          <td align="center" valign="middle"  width="100" <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?> ><?php if($v[$acValue['id_price_category']] >0) { ?>
            <span
                      <?php
          if($acValue['id_price_category']=='price_q' || $acValue['id_price_category']=='price_r2'){
			   if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="color:#FC0"';
		}else{
			  echo 'style="color:#FFFFFF;"';
		}
			  }
		  ?>
            
              ><?php echo (($acValue['id_price_category']=='price_r' || $acValue['id_price_category']=='price_s' || $acValue['id_price_category']=='price_t') && $v[$acValue['id_price_category']] >0 )?"+":" "  ?> <?php echo $v[$acValue['id_price_category']]?> </span>
            <?php
          	}
          	} ?></td>
          <?php }?>
        </tr>
        <?php
    }
    } ?>
      </table></td>
  </tr>
  <tr>
    <td align="center" valign="middle" style="width:100px;"><strong>Apple</strong></td>
    <td align="center" valign="middle" style="width:100px;"><strong>iPHone5</strong></td>
    <td><table width="100%" border="1" cellspacing="0" cellpadding="5">
        <tr>
          <td style="width:100px;" >&nbsp;</td>
          <td  style="width:420px;" >&nbsp;</td>
          <?php 
    foreach($acList as $list){
    ?>
          <td  style="width:100px; font-size:12px;"><?php echo $list['title_category']?></td>
          <?php }?>
        </tr>
        <?php 
    $rPlist84 = $rProducts->listProductsByCate(2);
    
    foreach($rPlist84 as $key => $v){

    if($v["price_a"]>0){	
    	?>
        <tr>
          <td style="width:100px;"><?php echo $v["code_product"]?></td>
          <td style="width:420px;"><?php echo $v["title_product"]?></td>
          <td align="center" valign="middle"
                <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?>  width="100" 
        ><span>
            <?php 
        
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
        	
        	echo '<a href="javascript:return false;" style="text-decoration:none" title="'.$v["date_introduce"].'"><img src="/im/sync.png" /></a>';
        }
        
        ?>
            <?php echo ($v["price_a"] == 999)?"CALL": $v["price_a"] ;?></span></td>
          <?php foreach($acList as $acKey => $acValue){
          if($acValue['id_price_category']!='price_a'){
          	?>
          <td align="center" valign="middle"  width="100" <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?> ><?php if($v[$acValue['id_price_category']] >0) { ?>
            <span 
                      <?php
          if($acValue['id_price_category']=='price_q' || $acValue['id_price_category']=='price_r2'){
			   if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="color:#FC0"';
		}else{
			  echo 'style="color:#FFFFFF;"';
		}
			  }
		  ?>
            
             ><?php echo (($acValue['id_price_category']=='price_r' || $acValue['id_price_category']=='price_s' || $acValue['id_price_category']=='price_t') && $v[$acValue['id_price_category']] >0 )?"+":" "  ?> <?php echo $v[$acValue['id_price_category']]?> </span>
            <?php
          	}
          	} ?></td>
          <?php }?>
        </tr>
        <?php
    }
    } ?>
      </table></td>
  </tr>
 <tr>
    <td align="center" valign="middle" style="width:100px;"><strong>Apple</strong></td>
    <td align="center" valign="middle" style="width:100px;"><strong>iPHone6</strong></td>
    <td><table width="100%" border="1" cellspacing="0" cellpadding="5">
        <tr>
          <td style="width:100px;" >&nbsp;</td>
          <td  style="width:420px;" >&nbsp;</td>
          <?php 
    foreach($acList as $list){
    ?>
          <td  style="width:100px; font-size:12px;"><?php echo $list['title_category']?></td>
          <?php }?>
        </tr>
        <?php 
    $rPlist84 = $rProducts->listProductsByCate(16);
    
    foreach($rPlist84 as $key => $v){

    if($v["price_a"]>0){	
    	?>
        <tr>
          <td style="width:100px;"><?php echo $v["code_product"]?></td>
          <td style="width:420px;"><?php echo $v["title_product"]?></td>
          <td align="center" valign="middle"
                <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?>  width="100" 
        ><span>
            <?php 
        
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
        	
        	echo '<a href="javascript:return false;" style="text-decoration:none" title="'.$v["date_introduce"].'"><img src="/im/sync.png" /></a>';
        }
        
        ?>
            <?php echo ($v["price_a"] == 999)?"CALL": $v["price_a"] ;?></span></td>
          <?php foreach($acList as $acKey => $acValue){
          if($acValue['id_price_category']!='price_a'){
          	?>
          <td align="center" valign="middle"  width="100" <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?> ><?php if($v[$acValue['id_price_category']] >0) { ?>
            <span 
                      <?php
          if($acValue['id_price_category']=='price_q' || $acValue['id_price_category']=='price_r2'){
			   if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="color:#FC0"';
		}else{
			  echo 'style="color:#FFFFFF;"';
		}
			  }
		  ?>
            
             ><?php echo (($acValue['id_price_category']=='price_r' || $acValue['id_price_category']=='price_s' || $acValue['id_price_category']=='price_t') && $v[$acValue['id_price_category']] >0 )?"+":" "  ?> <?php echo $v[$acValue['id_price_category']]?> </span>
            <?php
          	}
          	} ?></td>
          <?php }?>
        </tr>
        <?php
    }
    } ?>
      </table></td>
  </tr>  
</table>
<br />
<table border="1" cellspacing="0" cellpadding="0">
  <tr>
    <th colspan="3" bgcolor="#333333" scope="col" style="color:#fff; font-size:18px; padding:10px;">SAMSUNG</th>
  </tr>
  <tr>
    <td rowspan="5" align="center" valign="middle" style="width:100px;"><strong>Samsung</strong></td>
    <td align="center" valign="middle" style="width:100px;"><strong>S4</strong></td>
    <td><table width="100%" border="1" cellspacing="0" cellpadding="5">
        <tr>
          <td style="width:100px;" >&nbsp;</td>
          <td  style="width:420px;" >&nbsp;</td>
          <?php 
    foreach($acList as $list){
    ?>
          <td  style="width:100px; font-size:12px;"><?php echo $list['title_category']?></td>
          <?php }?>
        </tr>
        <?php 
    $rPlist85 = $rProducts->listProductsByCate(11);
    
    foreach($rPlist85 as $key => $v){

    if($v["price_a"]>0){	
    	?>
        <tr>
          <td style="width:100px;"><?php echo $v["code_product"]?></td>
          <td style="width:420px;"><?php echo $v["title_product"]?></td>
          <td align="center" valign="middle"
                <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?>
        
        ><span>
            <?php 
        
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
        	
        	echo '<a href="javascript:return false;" style="text-decoration:none" title="'.$v["date_introduce"].'"><img src="/im/sync.png" /></a>';
        }
        
        ?>
            <?php echo ($v["price_a"] == 999)?"CALL": $v["price_a"] ;?></span></td>
          <?php foreach($acList as $acKey => $acValue){
          if($acValue['id_price_category']!='price_a'){
          	?>
          <td align="center" valign="middle" width="100" <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?> ><?php if($v[$acValue['id_price_category']] >0) { ?>
            <span           <?php
          if($acValue['id_price_category']=='price_q' || $acValue['id_price_category']=='price_r2'){
			   if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="color:#FC0"';
		}else{
			  echo 'style="color:#FFFFFF;"';
		}
			  }
		  ?>  ><?php echo (($acValue['id_price_category']=='price_r' || $acValue['id_price_category']=='price_s' || $acValue['id_price_category']=='price_t') && $v[$acValue['id_price_category']] >0 )?"+":" "  ?> <?php echo $v[$acValue['id_price_category']]?> </span>
            <?php
          	}
          	} ?></td>
          <?php }?>
        </tr>
        <?php
    }
    } ?>
      </table></td>
  </tr>
  <tr>
    <td align="center" valign="middle" style="width:100px;"><strong>S2</strong></td>
    <td><table width="100%" border="1" cellspacing="0" cellpadding="5">
        <?php 
    $rPlist86 = $rProducts->listProductsByCate(5);
    
    foreach($rPlist86 as $key => $v){

    if($v["price_a"]>0){	
    	?>
        <tr>
          <td style="width:100px;"><?php echo $v["code_product"]?></td>
          <td style="width:420px;"><?php echo $v["title_product"]?></td>
          <td align="center" valign="middle"
                <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?>  width="100" 
        ><span>
            <?php 
        
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
        	
        	echo '<a href="javascript:return false;" style="text-decoration:none" title="'.$v["date_introduce"].'"><img src="/im/sync.png" /></a>';
        }
        
        ?>
            <?php echo ($v["price_a"] == 999)?"CALL": $v["price_a"] ;?></span></td>
          <?php foreach($acList as $acKey => $acValue){
          if($acValue['id_price_category']!='price_a'){
          	?>
          <td align="center" valign="middle"  width="100" <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?> ><?php if($v[$acValue['id_price_category']] >0) { ?>
            <span           <?php
          if($acValue['id_price_category']=='price_q' || $acValue['id_price_category']=='price_r2'){
			   if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="color:#FC0"';
		}else{
			  echo 'style="color:#FFFFFF;"';
		}
			  }
		  ?>  ><?php echo (($acValue['id_price_category']=='price_r' || $acValue['id_price_category']=='price_s' || $acValue['id_price_category']=='price_t') && $v[$acValue['id_price_category']] >0 )?"+":" "  ?> <?php echo $v[$acValue['id_price_category']]?> </span>
            <?php
          	}
          	} ?></td>
          <?php }?>
        </tr>
        <?php
    }
    } ?>
      </table></td>
  </tr>
  <tr>
    <td align="center" valign="middle" style="width:100px;"><strong>S3</strong></td>
    <td><table width="100%" border="1" cellspacing="0" cellpadding="5">
        <?php 
    $rPlist87 = $rProducts->listProductsByCate(6);
    
    foreach($rPlist87 as $key => $v){

    if($v["price_a"]>0){	
    	?>
        <tr>
          <td style="width:100px;"><?php echo $v["code_product"]?></td>
          <td style="width:420px;"><?php echo $v["title_product"]?></td>
          <td align="center" valign="middle"
                <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?>  width="100" 
        ><span>
            <?php 
        
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
        	
        	echo '<a href="javascript:return false;" style="text-decoration:none" title="'.$v["date_introduce"].'"><img src="/im/sync.png" /></a>';
        }
        
        ?>
            <?php echo ($v["price_a"] == 999)?"CALL": $v["price_a"] ;?></span></td>
          <?php foreach($acList as $acKey => $acValue){
          if($acValue['id_price_category']!='price_a'){
          	?>
          <td align="center" valign="middle"  width="100" <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?>  ><?php if($v[$acValue['id_price_category']] >0) { ?>
            <span           <?php
          if($acValue['id_price_category']=='price_q' || $acValue['id_price_category']=='price_r2'){
			   if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="color:#FC0"';
		}else{
			  echo 'style="color:#FFFFFF;"';
		}
			  }
		  ?>  ><?php echo (($acValue['id_price_category']=='price_r' || $acValue['id_price_category']=='price_s' || $acValue['id_price_category']=='price_t') && $v[$acValue['id_price_category']] >0 )?"+":" "  ?> <?php echo $v[$acValue['id_price_category']]?> </span>
            <?php
          	}
          	} ?></td>
          <?php }?>
        </tr>
        <?php
    }
    } ?>
      </table></td>
  </tr>
  <tr>
    <td align="center" valign="middle" style="width:100px;"><strong>other<br />
      Samsung</strong></td>
    <td><table width="100%" border="1" cellspacing="0" cellpadding="5">
        <?php 
    $rPlist88 = $rProducts->listProductsByCate(7);
    
    foreach($rPlist88 as $key => $v){

    if($v["price_a"]>0){	
    	?>
        <tr>
          <td style="width:100px;"><?php echo $v["code_product"]?></td>
          <td style="width:420px;"><?php echo $v["title_product"]?></td>
          <td align="center" valign="middle"
                <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?>  width="100" 
        ><span>
            <?php 
        
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
        	
        	echo '<a href="javascript:return false;" style="text-decoration:none" title="'.$v["date_introduce"].'"><img src="/im/sync.png" /></a>';
        }
        
        ?>
            <?php echo ($v["price_a"] == 999)?"CALL": $v["price_a"] ;?></span></td>
          <?php foreach($acList as $acKey => $acValue){
          if($acValue['id_price_category']!='price_a'){
          	?>
          <td align="center" valign="middle"  width="100" <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?>  ><?php if($v[$acValue['id_price_category']] >0) { ?>
            <span           <?php
          if($acValue['id_price_category']=='price_q' || $acValue['id_price_category']=='price_r2'){
			   if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="color:#FC0"';
		}else{
			  echo 'style="color:#FFFFFF;"';
		}
			  }
		  ?>  ><?php echo (($acValue['id_price_category']=='price_r' || $acValue['id_price_category']=='price_s' || $acValue['id_price_category']=='price_t') && $v[$acValue['id_price_category']] >0 )?"+":" "  ?> <?php echo $v[$acValue['id_price_category']]?> </span>
            <?php
          	}
          	} ?></td>
          <?php }?>
        </tr>
        <?php
    }
    } ?>
      </table></td>
  </tr>
<tr>
    <td align="center" valign="middle" style="width:100px;"><strong>S5</strong></td>
    <td><table width="100%" border="1" cellspacing="0" cellpadding="5">
        <?php 
    $rPlist88 = $rProducts->listProductsByCate(13);
    
    foreach($rPlist88 as $key => $v){

    if($v["price_a"]>0){	
    	?>
        <tr>
          <td style="width:100px;"><?php echo $v["code_product"]?></td>
          <td style="width:420px;"><?php echo $v["title_product"]?></td>
          <td align="center" valign="middle"
                <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?>  width="100" 
        ><span>
            <?php 
        
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
        	
        	echo '<a href="javascript:return false;" style="text-decoration:none" title="'.$v["date_introduce"].'"><img src="/im/sync.png" /></a>';
        }
        
        ?>
            <?php echo ($v["price_a"] == 999)?"CALL": $v["price_a"] ;?></span></td>
          <?php foreach($acList as $acKey => $acValue){
          if($acValue['id_price_category']!='price_a'){
          	?>
          <td align="center" valign="middle"  width="100" <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?>  ><?php if($v[$acValue['id_price_category']] >0) { ?>
            <span           <?php
          if($acValue['id_price_category']=='price_q' || $acValue['id_price_category']=='price_r2'){
			   if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="color:#FC0"';
		}else{
			  echo 'style="color:#FFFFFF;"';
		}
			  }
		  ?>  ><?php echo (($acValue['id_price_category']=='price_r' || $acValue['id_price_category']=='price_s' || $acValue['id_price_category']=='price_t') && $v[$acValue['id_price_category']] >0 )?"+":" "  ?> <?php echo $v[$acValue['id_price_category']]?> </span>
            <?php
          	}
          	} ?></td>
          <?php }?>
        </tr>
        <?php
    }
    } ?>
      </table></td>
  </tr>  
</table>
<br />
<table border="1" cellspacing="0" cellpadding="0">
  <tr>
    <th colspan="3" bgcolor="#333333" scope="col" style="color:#fff; font-size:18px; padding:10px;">HTC</th>
  </tr>
  <tr>
    <td align="center" valign="middle" style="width:100px;"><strong>HTC</strong></td>
    <td align="center" valign="middle" style="width:100px;"><strong>OneX</strong></td>
    <td><table width="100%" border="1" cellspacing="0" cellpadding="5">
        <tr>
          <td style="width:100px;" >&nbsp;</td>
          <td  style="width:420px;" >&nbsp;</td>
          <?php 
    foreach($acList as $list){
    ?>
          <td  style="width:100px; font-size:12px;"><?php echo $list['title_category']?></td>
          <?php }?>
        </tr>
        <?php 
    $rPlist89 = $rProducts->listProductsByCate(8);
    
    foreach($rPlist89 as $key => $v){

    if($v["price_a"]>0){	
    	?>
        <tr>
          <td style="width:100px;"><?php echo $v["code_product"]?></td>
          <td style="width:420px;"><?php echo $v["title_product"]?></td>
          <td align="center" valign="middle"
                <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?> width="100"
        ><span>
            <?php 
        
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
        	
        	echo '<a href="javascript:return false;" style="text-decoration:none" title="'.$v["date_introduce"].'"><img src="/im/sync.png" /></a>';
        }
        
        ?>
            <?php echo ($v["price_a"] == 999)?"CALL": $v["price_a"] ;?></span></td>
          <?php foreach($acList as $acKey => $acValue){
          if($acValue['id_price_category']!='price_a'){
          	?>
          <td align="center" valign="middle"  width="100" <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?>  ><?php if($v[$acValue['id_price_category']] >0) { ?>
            <span           <?php
          if($acValue['id_price_category']=='price_q' || $acValue['id_price_category']=='price_r2'){
			   if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="color:#FC0"';
		}else{
			  echo 'style="color:#FFFFFF;"';
		}
			  }
		  ?>  ><?php echo (($acValue['id_price_category']=='price_r' || $acValue['id_price_category']=='price_s' || $acValue['id_price_category']=='price_t') && $v[$acValue['id_price_category']] >0 )?"+":" "  ?> <?php echo $v[$acValue['id_price_category']]?> </span>
            <?php
          	}
          	} ?></td>
          <?php }?>
        </tr>
        <?php
    }
    } ?>
      </table></td>
  </tr>
</table>
<br />
<table border="1" cellspacing="0" cellpadding="0">
  <tr>
    <th colspan="3" bgcolor="#333333" scope="col" style="color:#fff; font-size:18px; padding:10px;">NOKIA</th>
  </tr>
  <tr>
    <td align="center" valign="middle" style="width:100px;"><strong>NOKIA</strong></td>
    <td align="center" valign="middle" style="width:100px;"><strong>X6</strong></td>
    <td><table width="100%" border="1" cellspacing="0" cellpadding="5">
        <tr>
          <td style="width:100px;" >&nbsp;</td>
          <td  style="width:420px;" >&nbsp;</td>
          <?php 
    foreach($acList as $list){
    ?>
          <td  style="width:100px; font-size:12px;"><?php echo $list['title_category']?></td>
          <?php }?>
        </tr>
        <?php 
    $rPlist90 = $rProducts->listProductsByCate(9);
    
    foreach($rPlist90 as $key => $v){

    if($v["price_a"]>0){	
    	?>
        <tr>
          <td style="width:100px;"><?php echo $v["code_product"]?></td>
          <td style="width:420px;"><?php echo $v["title_product"]?></td>
          <td align="center" valign="middle"
                <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?> width="100"
        ><span>
            <?php 
        
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
        	
        	echo '<a href="javascript:return false;" style="text-decoration:none" title="'.$v["date_introduce"].'"><img src="/im/sync.png" /></a>';
        }
        
        ?>
            <?php echo ($v["price_a"] == 999)?"CALL": $v["price_a"] ;?></span></td>
          <?php foreach($acList as $acKey => $acValue){
          if($acValue['id_price_category']!='price_a'){
          	?>
          <td align="center" valign="middle"  width="100" <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?>  ><?php if($v[$acValue['id_price_category']] >0) { ?>
            <span           <?php
          if($acValue['id_price_category']=='price_q' || $acValue['id_price_category']=='price_r2'){
			   if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="color:#FC0"';
		}else{
			  echo 'style="color:#FFFFFF;"';
		}
			  }
		  ?> ><?php echo (($acValue['id_price_category']=='price_r' || $acValue['id_price_category']=='price_s' || $acValue['id_price_category']=='price_t') && $v[$acValue['id_price_category']] >0 )?"+":" "  ?> <?php echo $v[$acValue['id_price_category']]?> </span>
            <?php
          	}
          	} ?></td>
          <?php }?>
        </tr>
        <?php
    }
    } ?>
      </table></td>
  </tr>
</table>
<!-- SONY--><br />

<table border="1" cellspacing="0" cellpadding="0">
  <tr>
    <th colspan="3" bgcolor="#333333" scope="col" style="color:#fff; font-size:18px; padding:10px;">SONY</th>
  </tr>
  <tr>
    <td align="center" valign="middle" style="width:100px;"><strong>SONY</strong></td>
    <td align="center" valign="middle" style="width:100px;"><strong>Xperia</strong></td>
    <td><table width="100%" border="1" cellspacing="0" cellpadding="5">
        <tr>
          <td style="width:100px;" >&nbsp;</td>
          <td  style="width:420px;" >&nbsp;</td>
          <?php 
    foreach($acList as $list){
    ?>
          <td  style="width:100px; font-size:12px;"><?php echo $list['title_category']?></td>
          <?php }?>
        </tr>
        <?php 
    $rPlist14 = $rProducts->listProductsByCate(14);
    
    foreach($rPlist14 as $key => $v){

    if($v["price_a"]>0){	
    	?>
        <tr>
          <td style="width:100px;"><?php echo $v["code_product"]?></td>
          <td style="width:420px;"><?php echo $v["title_product"]?></td>
          <td align="center" valign="middle"
                <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?> width="100"
        ><span>
            <?php 
        
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
        	
        	echo '<a href="javascript:return false;" style="text-decoration:none" title="'.$v["date_introduce"].'"><img src="/im/sync.png" /></a>';
        }
        
        ?>
            <?php echo ($v["price_a"] == 999)?"CALL": $v["price_a"] ;?></span></td>
          <?php foreach($acList as $acKey => $acValue){
          if($acValue['id_price_category']!='price_a'){
          	?>
          <td align="center" valign="middle"  width="100" <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?>  ><?php if($v[$acValue['id_price_category']] >0) { ?>
            <span           <?php
          if($acValue['id_price_category']=='price_q' || $acValue['id_price_category']=='price_r2'){
			   if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="color:#FC0"';
		}else{
			  echo 'style="color:#FFFFFF;"';
		}
			  }
		  ?> ><?php echo (($acValue['id_price_category']=='price_r' || $acValue['id_price_category']=='price_s' || $acValue['id_price_category']=='price_t') && $v[$acValue['id_price_category']] >0 )?"+":" "  ?> <?php echo $v[$acValue['id_price_category']]?> </span>
            <?php
          	}
          	} ?></td>
          <?php }?>
        </tr>
        <?php
    }
    } ?>
      </table></td>
  </tr>
</table><br />

<!--LG-->
<table border="1" cellspacing="0" cellpadding="0">
  <tr>
    <th colspan="3" bgcolor="#333333" scope="col" style="color:#fff; font-size:18px; padding:10px;">LG</th>
  </tr>
  <tr>
    <td align="center" valign="middle" style="width:100px;"><strong>LG</strong></td>
    <td align="center" valign="middle" style="width:100px;"><strong>LG</strong></td>
    <td><table width="100%" border="1" cellspacing="0" cellpadding="5">
        <tr>
          <td style="width:100px;" >&nbsp;</td>
          <td  style="width:420px;" >&nbsp;</td>
          <?php 
    foreach($acList as $list){
    ?>
          <td  style="width:100px; font-size:12px;"><?php echo $list['title_category']?></td>
          <?php }?>
        </tr>
        <?php 
    $rPlist14 = $rProducts->listProductsByCate(15);
    
    foreach($rPlist14 as $key => $v){

    if($v["price_a"]>0){	
    	?>
        <tr>
          <td style="width:100px;"><?php echo $v["code_product"]?></td>
          <td style="width:420px;"><?php echo $v["title_product"]?></td>
          <td align="center" valign="middle"
                <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?> width="100"
        ><span>
            <?php 
        
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
        	
        	echo '<a href="javascript:return false;" style="text-decoration:none" title="'.$v["date_introduce"].'"><img src="/im/sync.png" /></a>';
        }
        
        ?>
            <?php echo ($v["price_a"] == 999)?"CALL": $v["price_a"] ;?></span></td>
          <?php foreach($acList as $acKey => $acValue){
          if($acValue['id_price_category']!='price_a'){
          	?>
          <td align="center" valign="middle"  width="100" <?php
        if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="background-color:#FC0"';
		}
		?>  ><?php if($v[$acValue['id_price_category']] >0) { ?>
            <span           <?php
          if($acValue['id_price_category']=='price_q' || $acValue['id_price_category']=='price_r2'){
			   if(strtotime($v["date_introduce"]) > strtotime($date7days)){
		echo 'style="color:#FC0"';
		}else{
			  echo 'style="color:#FFFFFF;"';
		}
			  }
		  ?> ><?php echo (($acValue['id_price_category']=='price_r' || $acValue['id_price_category']=='price_s' || $acValue['id_price_category']=='price_t') && $v[$acValue['id_price_category']] >0 )?"+":" "  ?> <?php echo $v[$acValue['id_price_category']]?> </span>
            <?php
          	}
          	} ?></td>
          <?php }?>
        </tr>
        <?php
    }
    } ?>
      </table></td>
  </tr>
</table><br />
<!-- BEGIN: Powered by Supercounters.com -->
<center>
  <script type="text/javascript" src="http://widget.supercounters.com/hit.js"></script><script type="text/javascript">sc_hit(622289,10,8);</script><br>
  <noscript>
  <a href="http://www.supercounters.com/hitcounter">Free Hit Counter</a>
  </noscript>
</center>
<!-- END: Powered by Supercounters.com -->
<?php }?>
</body>
</html>
